﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace YasharEl.Infrastructure.ExceptionHandling
{
    [ContractClass(typeof(MessageTranslatorContract))]
    public interface IMessageTranslator
    {
        string Translate(string resourceKey);
    }

    [ContractClassFor(typeof(IMessageTranslator))]
    internal abstract class MessageTranslatorContract : IMessageTranslator
    {
        #region IMessageTranslator Members

        public string Translate(string resourceKey)
        {
            Contract.Requires<ArgumentNullException>(!string.IsNullOrEmpty(resourceKey), "resourceKey could not be null or empty.");

            return default(string);
        }

        #endregion
    }
}
